package com.atguigu;

import java.lang.reflect.Proxy;

public class Client {
    public static void main(String[] args) {
        Giao giao = new Giao();
        WuDaLangInvocationHandler handler = new WuDaLangInvocationHandler(giao);
//        Isale o = (Isale) Proxy.newProxyInstance(giao.getClass().getClassLoader(), giao.getClass().getInterfaces(), handler);
        Giao o =(Giao) Proxy.newProxyInstance(giao.getClass().getClassLoader(), giao.getClass().getInterfaces(), handler);
        o.saleapple();

        System.out.println(o);

    }

}
